<%--
  Created by IntelliJ IDEA.
  User: luo
  Date: 2025/5/23
  Time: 13:51
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="common/header.jsp">
    <jsp:param name="title" value="所有用户"/>
</jsp:include>
<%@ include file="common/adminMenu.jsp" %>

<div class="container">
  <div class="message">
    ${message}
  </div>
  <table border="1">
    <tr>
      <th>id:</th>
      <th>用户名:</th>
      <th>密码:</th>
      <th>是否是管理员:</th>
      <th>修改</th>
      <th>删除</th>
    </tr>
    <c:forEach items="${userList}" var="user">
    <tr>
      <td>${user.userId}</td>
      <td>${user.username}</td>
      <td>${user.password}</td>
      <td>${user.isAdmin ? '是' : '否'}</td>
      <td><a href="update-user-information-form?userId=${user.userId}">修改</a></td>
      <td>
        <a href="delete-user?userId=${user.userId}">删除</a>
      </td>
    </tr>
    </c:forEach>
  </table>
</div>

<%@ include file="common/footer.jsp" %>

